package org.ymx.myTree;

import java.util.TreeMap;

public class Test {

    /*
    public static void main(String[] args) {
        BinarySearchTree<Integer> binarySearchTree=new BinarySearchTree<>();
        binarySearchTree.insert(2);
        binarySearchTree.insert(1);
        binarySearchTree.insert(4);
        binarySearchTree.insert(3);
        binarySearchTree.insert(6);
        binarySearchTree.printTree("mid");
        binarySearchTree.remove(4);//删除元素而不是位置
        System.out.println("删除了2");
        binarySearchTree.printTree("mid");
    }
     */

    /**
     * 测试方法
     *
     * @param args
     */
    public static void main(String[] args) {
        MyBinaryTree tree = new MyBinaryTree();
        Node root = new Node(1);
        root.leftNode = new Node(2);
        root.rightNode = new Node(3);
        tree.setRoot(root);
        tree.frontShow();
        System.out.println();
        tree.afterShow();
    }


}
